#ifndef _LINKEDLIST_H_
#define _LINKEDLIST_H_

#include <stdio.h>
#include <stdlib.h>


/* coordinate */
typedef struct coordinate {
	int x;
	int y;
}coordinate_t;

/*
* double linked list struct
*/
typedef struct node {
	int data;
	struct coordinate point;
	struct node* next;
	struct node* prev;
} node_t;


/* unit queue */
typedef struct queue {
	int length;
	struct node* front;
	struct node* rear;
} queue_t;

typedef struct areaCoordinate {
	struct coordinate point1;
	struct coordinate point2;
}areaCoordinate_t;

/*
* methods
*/
void enqueue(queue_t* unitQueue, int data, coordinate_t point);
int dequeue(queue_t* unitQueue);
void initQueue(queue_t* &unitQueue);
void freeQueue(queue_t* &unitQueue);

#endif // _LINKEDLIST_H_